//
//  BaseMainPageViewController.m
//  codingke
//
//  Created by 许江涛 on 15/7/15.
//  Copyright (c) 2015年 1000Phone. All rights reserved.
//

#import "BaseMainPageViewController.h"

@interface BaseMainPageViewController ()

@end

@implementation BaseMainPageViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
}
- (void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:animated];
    
    // 下面添加的一层小view
    UIView *bottmView = [[UIView alloc] initWithFrame:CGRectMake(0, 49,SCREEN_WIDTH,20)];
    bottmView.backgroundColor =RGBACOLOR(245, 245, 245, 1);
    [self.tabBarController.tabBar addSubview:bottmView];
    
    
    if (self.tabBarController.tabBar.hidden == YES) {
        
        self.tabBarController.tabBar.hidden = NO;
        
        [UIView animateWithDuration:0.7 delay:0 usingSpringWithDamping:0.6 initialSpringVelocity:0.5 options:UIViewAnimationOptionCurveLinear animations:^{
            
            CGRect tabFrame = self.tabBarController.tabBar.frame;
            tabFrame.origin.y = SCREEN_HEIGHT - tabFrame.size.height;
            self.tabBarController.tabBar.frame = tabFrame;
        } completion:^(BOOL finished) {
            
        }];
        
//        [UIView animateWithDuration:0.35 animations:^{
//            CGRect tabFrame = self.tabBarController.tabBar.frame;
//            tabFrame.origin.y = SCREEN_HEIGHT - tabFrame.size.height;
//            self.tabBarController.tabBar.frame = tabFrame;
//        } completion:^(BOOL finished) {
//            
//        }];
    }
    
}
#pragma mark-
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
